// @ts-ignore

 
import { api } from '@/utils/api';

/** 计算周营收数据 POST /proDataRevenueWeek/calculate */
export async function proDataRevenueWeekCalculate(
  body: BIZAPI.ProDataRevenueWeekGetReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proDataRevenueWeekCalculate(
  body: BIZAPI.ProDataRevenueWeekGetReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proDataRevenueWeekCalculate(
  body: BIZAPI.ProDataRevenueWeekGetReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proDataRevenueWeekCalculate(
  body: BIZAPI.ProDataRevenueWeekGetReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proDataRevenueWeek/calculate`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proDataRevenueWeek/calculate`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 每个站点每周生成一条数据 POST /proDataRevenueWeek/generate */
export async function proDataRevenueWeekGenerate(
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proDataRevenueWeekGenerate(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proDataRevenueWeekGenerate(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proDataRevenueWeekGenerate(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proDataRevenueWeek/generate`, {
      method: 'POST',
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proDataRevenueWeek/generate`, {
    method: 'POST',
    ...(options || {})
  });
}

/** 获取周营收情况列表数据 POST /proDataRevenueWeek/list */
export async function proDataRevenueWeekList(
  body: BIZAPI.ProDataRevenueWeekGetReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultListProDataRevenueWeekEntity>;

export async function proDataRevenueWeekList(
  body: BIZAPI.ProDataRevenueWeekGetReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultListProDataRevenueWeekEntity>>;

export async function proDataRevenueWeekList(
  body: BIZAPI.ProDataRevenueWeekGetReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultListProDataRevenueWeekEntity>;

export async function proDataRevenueWeekList(
  body: BIZAPI.ProDataRevenueWeekGetReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultListProDataRevenueWeekEntity>(`/app/proDataRevenueWeek/list`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultListProDataRevenueWeekEntity>(`/app/proDataRevenueWeek/list`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 保存周营收情况 POST /proDataRevenueWeek/save */
export async function proDataRevenueWeekSave(
  body: BIZAPI.ProDataRevenueWeekEntity[],
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proDataRevenueWeekSave(
  body: BIZAPI.ProDataRevenueWeekEntity[],
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proDataRevenueWeekSave(
  body: BIZAPI.ProDataRevenueWeekEntity[],
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proDataRevenueWeekSave(
  body: BIZAPI.ProDataRevenueWeekEntity[],
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proDataRevenueWeek/save`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proDataRevenueWeek/save`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}
